<?php
 
class FrontController extends FrontControllerCore
{
    public function initContent()
    {
        $this->process();
        if (!isset($this->context->cart))
                $this->context->cart = new Cart();
        if ($this->context->getMobileDevice() == false) {
            // These hooks aren't used for the mobile theme.
            // Needed hooks are called in the tpl files.
            if (!isset($this->context->cart))
                $this->context->cart = new Cart();
            $this->context->smarty->assign(array(
                /* === START: DO NOT TOUCH IT */
                'HOOK_HEADER' => Hook::exec('displayHeader'),
                'HOOK_TOP' => Hook::exec('displayTop'),
                'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
                'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
                /* === END: DO NOT TOUCH IT */
                 
                /* === START: ADD HOOK | EXAMPLE */
                'HOOK_MY_USER' => Module::hookExec('myUser'),
                'HOOK_MY_CATEGORIES' => Module::hookExec('myCategories'),
                'HOOK_SEARCH' => Module::hookExec('mySearch')
                /* === END: ADD HOOK | EXAMPLE */
            ));
        } else {
            $this->context->smarty->assign(array(
                'HOOK_MOBILE_HEADER' => Hook::exec('displayMobileHeader'),
            ));
        }
    }
}

?>